﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Library1
{
    public class iniForWinForm : ini
    {  
        public iniForWinForm(string INIPath) : base (INIPath)
        {            
        }

        public override string IniReadValue(string Section, string Key)
        {
            //Kiểm tra có file ini chưa không thì tự tạo            
            if (!File.Exists(this.path))
            {
                FileStream fs = File.Create(this.path);
                fs.Close();
                this.IniWriteValue("General", "Version", "PUBLIC");
            }            

            return base.IniReadValue(Section, Key);
        }
    }
}
